3.1.81 \(\int \frac {A+B x^2}{x (a+b x^2)^2} \, dx\)

Optimal. Leaf size=51 \[ -\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {A b-a B}{2 a b \left (a+b x^2\right )} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {446, 77} \begin {gather*} -\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {A b-a B}{2 a b \left (a+b x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x^2)/(x*(a + b*x^2)^2),x]

[Out]

(A*b - a*B)/(2*a*b*(a + b*x^2)) + (A*Log[x])/a^2 - (A*Log[a + b*x^2])/(2*a^2)

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {A+B x^2}{x \left (a+b x^2\right )^2} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {A+B x}{x (a+b x)^2} \, dx,x,x^2\right )\\ &=\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {A}{a^2 x}+\frac {-A b+a B}{a (a+b x)^2}-\frac {A b}{a^2 (a+b x)}\right ) \, dx,x,x^2\right )\\ &=\frac {A b-a B}{2 a b \left (a+b x^2\right )}+\frac {A \log (x)}{a^2}-\frac {A \log \left (a+b x^2\right )}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 46, normalized size = 0.90 \begin {gather*} \frac {\frac {a (A b-a B)}{b \left (a+b x^2\right )}-A \log \left (a+b x^2\right )+2 A \log (x)}{2 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x^2)/(x*(a + b*x^2)^2),x]

[Out]

((a*(A*b - a*B))/(b*(a + b*x^2)) + 2*A*Log[x] - A*Log[a + b*x^2])/(2*a^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x^2}{x \left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x^2)/(x*(a + b*x^2)^2),x]

[Out]

IntegrateAlgebraic[(A + B*x^2)/(x*(a + b*x^2)^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 70, normalized size = 1.37 \begin {gather*} -\frac {B a^{2} - A a b + {\left (A b^{2} x^{2} + A a b\right )} \log \left (b x^{2} + a\right ) - 2 \, {\left (A b^{2} x^{2} + A a b\right )} \log \relax (x)}{2 \, {\left (a^{2} b^{2} x^{2} + a^{3} b\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

-1/2*(B*a^2 - A*a*b + (A*b^2*x^2 + A*a*b)*log(b*x^2 + a) - 2*(A*b^2*x^2 + A*a*b)*log(x))/(a^2*b^2*x^2 + a^3*b)

________________________________________________________________________________________

giac [A]  time = 0.33, size = 63, normalized size = 1.24 \begin {gather*} \frac {A \log \left (x^{2}\right )}{2 \, a^{2}} - \frac {A \log \left ({\left | b x^{2} + a \right |}\right )}{2 \, a^{2}} + \frac {A b^{2} x^{2} - B a^{2} + 2 \, A a b}{2 \, {\left (b x^{2} + a\right )} a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*A*log(x^2)/a^2 - 1/2*A*log(abs(b*x^2 + a))/a^2 + 1/2*(A*b^2*x^2 - B*a^2 + 2*A*a*b)/((b*x^2 + a)*a^2*b)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 53, normalized size = 1.04 \begin {gather*} \frac {A}{2 \left (b \,x^{2}+a \right ) a}+\frac {A \ln \relax (x )}{a^{2}}-\frac {A \ln \left (b \,x^{2}+a \right )}{2 a^{2}}-\frac {B}{2 \left (b \,x^{2}+a \right ) b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x^2+A)/x/(b*x^2+a)^2,x)

[Out]

1/2/a/(b*x^2+a)*A-1/2/b/(b*x^2+a)*B-1/2*A*ln(b*x^2+a)/a^2+A*ln(x)/a^2

________________________________________________________________________________________

maxima [A]  time = 1.12, size = 51, normalized size = 1.00 \begin {gather*} -\frac {B a - A b}{2 \, {\left (a b^{2} x^{2} + a^{2} b\right )}} - \frac {A \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {A \log \left (x^{2}\right )}{2 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x^2+A)/x/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(B*a - A*b)/(a*b^2*x^2 + a^2*b) - 1/2*A*log(b*x^2 + a)/a^2 + 1/2*A*log(x^2)/a^2

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 47, normalized size = 0.92 \begin {gather*} \frac {A\,\ln \relax (x)}{a^2}-\frac {A\,\ln \left (b\,x^2+a\right )}{2\,a^2}+\frac {A\,b-B\,a}{2\,a\,b\,\left (b\,x^2+a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x^2)/(x*(a + b*x^2)^2),x)

[Out]

(A*log(x))/a^2 - (A*log(a + b*x^2))/(2*a^2) + (A*b - B*a)/(2*a*b*(a + b*x^2))

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 46, normalized size = 0.90 \begin {gather*} \frac {A \log {\relax (x )}}{a^{2}} - \frac {A \log {\left (\frac {a}{b} + x^{2} \right )}}{2 a^{2}} + \frac {A b - B a}{2 a^{2} b + 2 a b^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x**2+A)/x/(b*x**2+a)**2,x)

[Out]

A*log(x)/a**2 - A*log(a/b + x**2)/(2*a**2) + (A*b - B*a)/(2*a**2*b + 2*a*b**2*x**2)

________________________________________________________________________________________